package com.xoms.front.persist.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xoms.front.model.StoreHouseBean;
import com.xoms.front.persist.dao.StoreHouseDao;

@Repository
public class StoreHouseImpl extends BaseImpl implements StoreHouseDao {
	private final String NAME_SPACE = NAME_SPACE_HEADER + ".StoreHouseMapper";

	@Override
	public StoreHouseBean selectOneById(String sid) {
		Map<String, Object> where = new HashMap<>();
		where.put("sid", sid);
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectOneById", where);
	}

	@Override
	public StoreHouseBean selectOneByAdminIdAndType(String adminId, int type) {
		Map<String, Object> where = new HashMap<>();
		where.put("adminId", adminId);
		where.put("type", type);
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectOneByAdminIdAndType", where);
	}

}
